package com.boc.langxiang.ui.dialog;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.boc.langxiang.R;
import com.boc.langxiang.util.L;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * CreateTime: 2016-07-06上午9:56
 * Author: wjkjinke00@126.com
 * Description:
 */
public class ShareDialog extends DialogFragment {

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //全屏
        setStyle(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Translucent_NoTitleBar);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.dialog_share, container, false);
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
    }

    @OnClick({R.id.share_weixin, R.id.share_weif, R.id.share_sina, R.id.share_qq, R.id.close})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.share_weixin:
                L.i("share_weixin");
                dismiss();
                break;
            case R.id.share_weif:
                L.i("share_weif");
                dismiss();
                break;
            case R.id.share_sina:
                L.i("share_sina");
                dismiss();
                break;
            case R.id.share_qq:
                L.i("share_qq");
                dismiss();
                break;
            case R.id.close:
                dismiss();
                break;
        }
    }
}
